Imports System.IO
Public Class frmNewBookmark

    Private Sub frmNewBookmark_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        cmbFolders.Items.Clear()
        LoadFoldersComboBox(FavoritesFolder, cmbFolders)
    End Sub

    Private Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
        Try
            AccessBookmarks.NewBookmark(txtNewBookmarkWebsite.Text, FavoritesFolder & cmbFolders.SelectedItem & "\" & txtNewBookmarkName.Text & ".url", txtNewBookmarkName.Text)
        Catch ex As Exception
            ErrorMessage = ex.ToString()
            ShowError(ex.Message, Err.Description, Err.Number)
        End Try
        AccessBookmarks.GetDirectoryStructure(FavoritesFolder)
        LoadBookmarks(frmMain.trvBookmarks)
        Me.Close()
    End Sub
End Class